package com.yuelao.yuelao_backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 质押记录表
 */
@Data
@TableName("staking_records")
public class StakingRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 矿池ID
     */
    private Long poolId;

    /**
     * 质押数量（以分为单位）
     */
    private Integer amount;

    /**
     * 当前奖励
     */
    private BigDecimal currentRewards;

    /**
     * 已领取奖励
     */
    private BigDecimal totalClaimed;

    /**
     * 状态: staking, unstaking, completed
     */
    private String status;

    /**
     * 质押时间
     */
    private LocalDateTime stakingTime;

    /**
     * 预期解锁时间
     */
    private LocalDateTime expectedUnlockTime;

    /**
     * 提取时间
     */
    private LocalDateTime unstakingTime;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;
}

